<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Login</title>
</head>
<body>
	<form action="#">
		用户名：<input type="text" name="name"><br>
		密码：<input type="text" name="password"><br>
		<button type="submit">提交</button>
	</form>
	
	<%
		String name = request.getParameter("name");
		String password = request.getParameter("password");
		// out.println(name + password);
		if(name!=null&&password!=null) {
			if (name.equals(password)) {
				response.sendRedirect("welcome.jsp");
			} else {
				out.println("登录错误！");
			}
		}
	%>
</body>
</html>